package com.wj.rpsm.user.service.impl;

import com.wj.rpsm.user.mapper.MessageMapper;
import com.wj.rpsm.user.pojo.Message;
import com.wj.rpsm.user.pojo.vo.ForumVo;
import com.wj.rpsm.user.service.MessageService;
import io.swagger.models.auth.In;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * @author WeiJin
 * @version 1.0
 */
@Service
public class MessageServiceImpl implements MessageService {


    @Autowired
    private MessageMapper messageMapper;

    @Override
    public List<ForumVo> queryMessage(Integer id,Integer messageId, String title ,Integer fromId) {
        return messageMapper.queryMessage(id,messageId,title,fromId);
    }

    @Override
    public Integer addMessage(Message message) {
        return messageMapper.addMessage(message);
    }

    @Override
    public Integer updateMessageLike(Integer messageId) {
        return messageMapper.updateMessageLike(messageId);
    }

    @Override
    public Integer updateMessageUnlike(Integer messageId) {
        return messageMapper.updateMessageUnlike(messageId);
    }

    @Override
    public Integer updateMessageBrowse(Integer id) {
        return messageMapper.updateMessageBrowse(id);
    }
}
